<!DOCTYPE html>
<html>

<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>{$current['title']}-{$Think.CONFIG.sitename}</title>

    <link href="__PUBLIC__/static/css/bootstrap.min.css?v=3.3.5" rel="stylesheet">
    <link href="__PUBLIC__/static/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">

    <!-- Data Tables -->
    <link href="__PUBLIC__/static/css/plugins/dataTables/dataTables.bootstrap.css" rel="stylesheet">
    <link href="__PUBLIC__/static/css/plugins/datapicker/datepicker3.css" rel="stylesheet">
    <link href="__PUBLIC__/static/css/animate.min.css" rel="stylesheet">
    <include file="Public/commoncss" />

</head>

<body class="gray-bg  top-navigation">
<div id="wrapper">
    <div id="page-wrapper" class="gray-bg">
        <div class="row border-bottom white-bg">
            <include file="Public/header" />
        </div>
        <div class="wrapper wrapper-content animated fadeInRight">
            <div class="row">
                <div class="col-sm-3">
                    <div class="ibox float-e-margins">
                        <include file="Public/atcenav" />
                    </div>
                </div>
                <div class="col-sm-9 animated fadeInRight">
                    <div class="ibox float-e-margins">
                        <div class="ibox-title">
                            <h5>工作列表 <small>{$month|date='Y年m月d日',###} 之前未审核数据</small></h5>
                            <div class="ibox-tools" >

                                <a href="javascript:;" id="datepicker" style="color:black;">
                                    <i class="fa fa-calendar"></i>
                                    <input type="text" class="date" id="dateMonth"  value="{$month|date='Y-m-d',###}" readonly>
                                </a>

                            </div>
                        </div>
                        <div class="ibox-content">

                            <table class="table table-striped table-bordered table-hover dataTables-example">
                                <thead>
                                <tr>
                                    <th> 序 号 </th>
                                    <th> 所属人</th>
                                    <th> 日 期 </th>
                                    <th> 时 间 </th>
                                    <th> 类 型 </th>
                                    <th> 项 目 </th>
                                    <th>相关说明</th>
                                    <th> 操 作 </th>
                                </tr>
                                </thead>
                                <tbody>
                                <volist name="list" id="vo" >
                                    <tr class="gradeU">
                                        <td>{$i}</td>
                                        <td>{$vo.name}</td>
                                        <td>{$vo.date|date='Y-m-d',###}</td>
                                        <td>{$vo.start|date='H:i',###}--{$vo.end|date='H:i',###}</td>
                                        <td>{$vo.rid|getRptFname}</td>
                                        <td>{$vo.rid|getRptName}</td>
                                        <td style="width: 268px;">{$vo.content|mb_substr=0,60,'utf-8'}</td>
                                        <td class="center">
                                            <if condition="$user['type'] neq '0'">
                                                <a class="select" val="{$vo['id']}">{$vo.status|getRptType}</a>
                                                <select class="selectStu hide">
                                                    <option value="0" selected>暂不审核</option>
                                                    <option value="1">审核通过</option>
                                                    <option value="2">不 通 过</option>
                                                </select>
                                            </if>
                                        </td>

                                    </tr>
                                </volist>
                                </tbody>
                                <tfoot>
                                <tr>
                                    <th> 序 号 </th>
                                    <th> 所属人</th>
                                    <th> 日 期 </th>
                                    <th> 时 间 </th>
                                    <th> 类 型 </th>
                                    <th> 项 目 </th>
                                    <th>相关说明</th>
                                    <th> 操 作 </th>
                                </tr>
                                </tfoot>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <include file="Public/footer" />
    </div>
</div>
<include file="Public/commonjs" />
<script src="__PUBLIC__/static/js/bootstrap.min.js?v=3.3.5"></script>
<script src="__PUBLIC__/static/js/plugins/dataTables/jquery.dataTables.js"></script>
<script src="__PUBLIC__/static/js/plugins/dataTables/dataTables.bootstrap.js"></script>
<script src="__PUBLIC__/static/js/content.min.js?v=1.0.0"></script>
<script src="__PUBLIC__/static/js/plugins/datapicker/bootstrap-datepicker.js"></script>
<script>
    $(document).ready(function() {
        $(".dataTables-example").dataTable();
        $(".select").click(function(){
            $(this).addClass('hide');
            $(this).parent().find(".selectStu").removeClass('hide');
        })
        $(".selectStu").on("change",function(){
            var ob = $(this);
            var sid=ob.val();
            var id = ob.parent().find('.select').attr('val');
            $.get("{:U('Work/saveStu')}?id="+id+"&sid="+sid,function(data){
                var text = ob.find("option:selected").text();
                ob.parent().find(".select").removeClass('hide').html(text);
                ob.addClass('hide');
            });
        })
        //日期控件
        $("#datepicker .date").datepicker({
            format: 'yyyy-mm-dd',todayBtn: "linked",
            keyboardNavigation: !1,
            forceParse: !1,
            calendarWeeks: !0,
            autoclose: !0});
        //日期选择查询
        $("#dateMonth").on('change',function(){
            var month = $('#dateMonth').val();
            window.location.href="{:U('Attence/reports')}?month="+month;
        })
    });
</script>


</body>

</html>